trigger: none

# Don't schedule the interpreter pipeline unless we commit to making it clean and monitoring the results.
#schedules:
#- cron: "0 19 * * 6,0"
#  displayName: Sat and Sun at 11:00 AM (UTC-8:00)
#  branches:
#    include:
#    - main
#  always: true

variables:
  - template: /eng/pipelines/common/variables.yml

extends:
  template:  /eng/pipelines/common/templates/pipeline-with-resources.yml
  parameters:
    stages:
    - stage: Build
      jobs:

      - template: /eng/pipelines/common/platform-matrix.yml
        parameters:
          jobTemplate: /eng/pipelines/common/global-build-job.yml
          buildConfig: checked
          platforms:
          - linux_arm
          - linux_arm64
          - linux_x64
          - windows_x64
          - windows_x86
          - windows_arm64
          - CoreClrTestBuildHost # Either osx_x64 or linux_x64
          jobParameters:
            buildArgs: -s clr+libs -c $(_BuildConfig) -lc Release /p:CMakeArgs="-DFEATURE_INTERPRETER=1"
            postBuildSteps:
              - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml
              - template: /eng/pipelines/common/upload-artifact-step.yml
                parameters:
                  rootFolder: $(Build.SourcesDirectory)/artifacts/bin
                  includeRootFolder: false
                  archiveType: $(archiveType)
                  archiveExtension: $(archiveExtension)
                  tarCompression: $(tarCompression)
                  artifactName: CoreCLRInterpreterBuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)
                  displayName: Build Assets
            extraVariablesTemplates:
              - template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml
                parameters:
                  testGroup: clrinterpreter

      - template: /eng/pipelines/common/platform-matrix.yml
        parameters:
          jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml
          buildConfig: checked
          platforms:
          - CoreClrTestBuildHost # Either osx_x64 or linux_x64
          jobParameters:
            testGroup: clrinterpreter

      - template: /eng/pipelines/common/platform-matrix.yml
        parameters:
          jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml
          buildConfig: checked
          platforms:
          - linux_arm
          - linux_arm64
          - linux_x64
          - windows_x64
          - windows_x86
          - windows_arm64
          helixQueueGroup: ci
          helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
          jobParameters:
            testGroup: clrinterpreter
            liveLibrariesBuildConfig: Release
            dependsOn:
              - build_$(osGroup)$(osSubgroup)_$(archType)_checked_
              - coreclr_common_test_build_pri0_AnyOS_AnyCPU_checked
            unifiedArtifactsName: CoreCLRInterpreterBuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)
